package com.googlecode.kipler.test;

import com.googlecode.kipler.parsing.Parser;
import com.googlecode.kipler.syntax.formula.BooleanFormula;
import com.googlecode.kipler.syntax.formula.Formula;
import com.googlecode.kipler.syntax.formula.BooleanFormula.Operator;


public class FLib {
	public static Formula cdAEqualsC() {
		return Parser
				.parseFormulaWithNs(NsUtil.getNsDef() + "mine:A = mine:C;");
	}

	public static Formula cdAEqualsD() {
		return Parser
				.parseFormulaWithNs(NsUtil.getNsDef() + "mine:A = mine:D;");
	}

	public static Formula caCx() {
		return Parser.parseFormulaWithNs(NsUtil.getNsDef() + "mine:C(mine:x);");
	}

	public static Formula caDy() {
		return Parser.parseFormulaWithNs(NsUtil.getNsDef() + "mine:D(mine:y);");
	}

	public static Formula raXValueY() {
		return Parser.parseFormulaWithNs(NsUtil.getNsDef()
				+ "mine:value(mine:x, mine:y);");
	}

	public static Formula andPhiPsi(Formula phi, Formula psi) {
		return new BooleanFormula(Operator.AND, phi, psi);
	}

	public static Formula orPhiPsi(Formula phi, Formula psi) {
		return new BooleanFormula(Operator.OR, phi, psi);
	}
}
